<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- /fasttmp/mkdist-qt-4.3.5-1211793125/qtopia-core-opensource-src-4.3.5/doc/src/qtopiacore-displaymanagement.qdoc -->
<head>
  <title>Qt 4.3: Qtopia Core Display Management</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://www.trolltech.com/products/qt"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
<td align="right" valign="top" width="230"><a href="http://www.trolltech.com"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></a></td></tr></table><h1 align="center">Qtopia Core Display Management<br /><small></small></h1>
<p>When rendering, <a href="qtopiacore.html">Qtopia Core</a>'s default behavior is for each client to render its widgets into memory while the server is responsible for putting the contents of the memory onto the screen. The server uses the screen driver to copy the content of the memory to the display.</p>
<p>The screen driver is loaded by the server application when it starts running, using Qt's <a href="plugins-howto.html">plugin system</a>.</p>
<p>Contents:</p>
<ul><li><a href="#available-drivers">Available Drivers</a></li>
<li><a href="#specifying-a-driver">Specifying a Driver</a></li>
</ul>
<a name="available-drivers"></a>
<h2>Available Drivers</h2>
<p><a href="qtopiacore.html">Qtopia Core</a> provides drivers for the Linux framebuffer, the virtual framebuffer, transformed screens, VNC servers and multi screens. Run the <tt>configure</tt> script to list the available drivers:</p>
<pre> ./configure -help</pre>
<p>In the default Qt configuration, only an unaccelerated Linux framebuffer driver (<tt>/dev/fb0</tt>) is enabled. The various drivers can be enabled and disabled using the <tt>configure</tt> script. For example:</p>
<pre> ./configure -qt-gfx-transformed</pre>
<p>Custom screen drivers can be implemented by subclassing the <a href="qscreen.html">QScreen</a> class and creating a screen driver plugin (derived from the <a href="qscreendriverplugin.html">QScreenDriverPlugin</a> class). <a href="qtopiacore.html">Qtopia Core</a>'s implementation of the <a href="qscreendriverfactory.html">QScreenDriverFactory</a> class will automatically detect the plugin, loading the driver into the server application at runtime.</p>
<a name="specifying-a-driver"></a>
<h2>Specifying a Driver</h2>
<p>To specify which driver to use, set the <a href="qtopiacore-envvars.html#qws-display">QWS_DISPLAY</a> environment variable. For example (if the current shell is bash, ksh, zsh or sh):</p>
<pre> export QWS_DISPLAY=&quot;&lt;driver&gt;[:&lt;driver specific options&gt;]...
          [:&lt;display num&gt;]&quot;</pre>
<p>The valid values for the <tt>&lt;driver&gt;</tt> argument are <tt>LinuxFb</tt>, <tt>QVFb</tt>, <tt>VNC</tt>, <tt>Transformed</tt>, <tt>Multi</tt> and <a href="qscreendriverplugin.html#keys">keys</a> identifying custom drivers, and the <tt>&lt;display num&gt;</tt> argument is used to separate screens that are using the same screen driver and to enable multiple displays (see the <a href="qtopiacore-running.html">Running Qtopia Core Applications</a> documentation for more details). The driver specific options are described in the table below.</p>
<p><table align="center" cellpadding="2" cellspacing="1" border="0">
<thead><tr valign="top" class="qt-style"><th>Driver Specific Option</th><th>Available For</th><th>Description</th></tr></thead>
<tr valign="top" class="odd"><td><tt>tty=&lt;device&gt;</tt></td><td>LinuxFb</td><td>Passes the device file to the console the application is running on.</td></tr>
<tr valign="top" class="even"><td><tt>nographicsmodeswitch</tt></td><td>LinuxFb</td><td>Ensures that the application is not in graphics mode.</td></tr>
<tr valign="top" class="odd"><td><tt>mmWidth=&lt;value&gt;</tt> <a name="mmwidth"></a></td><td>LinuxFb, QVFb</td><td>The screen's physical width (used to calculate DPI).</td></tr>
<tr valign="top" class="even"><td><tt>mmHeight=&lt;value&gt;</tt> <a name="mmheight"></a></td><td>LinuxFb, QVFb</td><td>The screen's physical height (used to calculate DPI).</td></tr>
<tr valign="top" class="odd"><td><tt>&lt;device&gt;</tt></td><td>LinuxFb</td><td></td></tr>
<tr valign="top" class="even"><td><tt>&lt;subdriver&gt;</tt></td><td>VNC, Transformed, Multi</td><td>Specifies a subdriver.</td></tr>
<tr valign="top" class="odd"><td><tt>&lt;RotX&gt;</tt></td><td>Transformed</td><td>Specifies the rotation of the screen. The valid values of <tt>X</tt> are 90, 180 and 270.</td></tr>
<tr valign="top" class="even"><td><tt>offset=&lt;x,y&gt;</tt></td><td>Multi</td><td>Specifies the coordinates of a subscreens top-left corner (by default 0,0).</td></tr>
</table></p>
<p>The <a href="qtopiacore-envvars.html#qws-display">QWS_DISPLAY</a> environment variable can also be set using the <tt>-display</tt> option when running an application. For example:</p>
<pre> myApplication -display &quot;&lt;driver&gt;[:&lt;driver specific options&gt;]...
          [:&lt;display num&gt;]&quot;</pre>
<p><table width="100%" align="center" cellpadding="2" cellspacing="1" border="0">
<thead><tr valign="top" class="qt-style"><th>Subdrivers</th></tr></thead>
<tr valign="top" class="odd"><td>The VNC, Transformed and Multi screen drivers depend on subdrivers. The general syntax for specifying a driver is as follows:<pre> export QWS_DISPLAY=&quot;&lt;driver&gt;[:&lt;subdriver&gt;][:&lt;subdriver options&gt;]...
         [ :&lt;display num&gt;]&quot;</pre>
<p>In the case of subdrivers, it is important to add a space between each subdriver and before the display number to separate the various drivers and displays. Note that <tt>Multi</tt> screen drivers can have several subdrivers. For example:</p>
<pre> export QWS_DISPLAY=&quot;Multi: QVFb:0 QVFb:offset=640,0:1 :2&quot;</pre>
<p>Note also that the VNC screen driver defaults to a virtual screen driver if no subdriver is specified. In this case the VNC driver accepts a few additional (optional) arguments specifying the size and depth of the default virtual screen:</p>
<ul>
<li><tt>size=&lt;width x height&gt;</tt></li>
<li><tt>depth=&lt;value&gt;</tt></li>
<li><tt>mmHeight=&lt;physical height in millimeters&gt;</tt></li>
<li><tt>mmWidth=&lt;physical width in millimeters&gt;</tt></li>
</ul>
<p>Example running the VNC screen driver with a virtual screen of size 720x480 with 32 bits per pixel:</p>
<pre> export QWS_DISPLAY=&quot;VNC:size=720x480:depth=32&quot;</pre>
<p>Example running the VNC screen driver on top of the Linux framebuffer driver:</p>
<pre> export QWS_DISPLAY=&quot;VNC:LinuxFb&quot;</pre>
</td></tr>
</table></p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%">Copyright &copy; 2008 <a href="trolltech.html">Trolltech</a></td>
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="30%" align="right"><div align="right">Qt 4.3.5</div></td>
</tr></table></div></address></body>
</html>
